Sample code for making zip files using Zip32.dll (vbZip11.dll)
from Info-ZIP http://www.cdrom.com/pub/infozip/infozip.html

  This project is a small program that makes zip files. 
It requires the Info-ZIP DLL, Zip32.dll.(vbZip11.dll) Version 2.3 
was used with this code.

  ModZip.bas has all of the zip functionality.
  fZip.frm is just to demonstrate the usage.
  ModBrowse.bas contains FileOpen and FileSave functions for use
  with fZip.frm.

  Zip32.dll (vbZip11.dll) provides a number of extra zip options, such
as adding comments to a zip file or adding password protection. This 
code just makes a simple zip, with options only for compression level
and whether to save the relative folder path of the zipped files.

  This code borrows from a handful of VB samples. Some of
the sample code around seemed to only work if no compression
was used! In general there seems to be little documentation of
the various options and the proper use of the 4 callback functions
(at least in terms of VB). By borrowing from different VB samples and
 available information, and by sidestepping the callback functions,
I came up with this fairly simple, and seemingly dependable,
version of a file-zipping module.

  The main function is ZipIt. It's a very straightforward function that
makes a zip file, taking as parameters: an array of file path strings, 
the zip file path string, and a compression level number -

R = ZipIt(A, Num, Path, Comp, FullPath)

 A - an array of strings representing the full path of each file to be zipped.
 Num - number of files to be zipped.
 Path - full path of zip file to be made.
 Comp - compression level, from 0 to 9.
 FullPath - Boolean, whether to conserve relative folder paths of zipped files.
 R - returns an error code, 0 on success.

 See the notes in the code for more details.

Feel free to use this code as you see fit. You use it at your own risk.


Joe Priestley

Joe'Software
www.jsware.net
joesware@jsware.net

